<?php
class Core_Data_Selectdatabase implements Core_Data_Mainable{
    
    public $database;
    
    public function __construct() {
        $this->database = new Core_Driver_MysqlImproved;
    }
    public function main(array $variables = null) {
        $this->database->connect();
        $this->database->prepare($variables['sql_query']);
        $this->database->query();
        $data_array = array();
        $row = 0;
        while($data = $this->database->fetch('array')){
            $data_array[$row] = $data;
            $row++;
        }
        return $data_array;
    }

}
